package org.linlinjava.litemall.admin.controller.address;

import io.swagger.annotations.ApiOperation;
import org.linlinjava.litemall.admin.beans.annotation.LogAnno;
import org.linlinjava.litemall.admin.controller.address.vo.AdminAddressPageReqVO;
import org.linlinjava.litemall.admin.service.AdminAddressService;
import org.linlinjava.litemall.core.util.ResponseUtil;
import org.linlinjava.litemall.core.validator.Order;
import org.linlinjava.litemall.core.validator.Sort;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 管理地址控制器
 *
 * @author yliyun
 * @date 2022/09/14
 */
@RestController
@RequestMapping("/admin/address")
@Validated
public class AdminAddressController {

    /**
     * 收货地址服务
     */
    @Autowired
    private AdminAddressService addressService;


    @ApiOperation("地址列表")
    @GetMapping("/list")
    @LogAnno
    public Object page(AdminAddressPageReqVO pageReqVO) {
        return ResponseUtil.okPage(addressService.page(pageReqVO));
    }

}
